#pragma once
#ifndef SOUND_H
#define SOUND_H

#include <dshow.h>
#include <vector> 
using namespace std;

class CSound
{
public:
	enum eSoundName
	{
		eSoundZombie1,
		eSoundZombie2,
		eSoundZombie3,
		eSoundZombie4,
		eSoundPlayerSuffering
	};
private:
	//singleton variables
	static CSound* m_instance;

	//DirectShow variables
	IGraphBuilder* m_graphBuilder;
	IMediaControl* m_mediaControl;
	IMediaEvent* m_mediaEvent;

	vector<string> m_addressSoundEffect;
	string m_addressPlayBackSound;

public:
	static CSound* getInstance(void);
	void close();

	bool initialise();

	void addSound(int* indexSound, string address);
	void addBackSound(string address);

	void playSound(int indexSound);
	void playBackSound();

private:
	CSound(void);
	~CSound(void);
};
#define SOUND CSound::getInstance()

#endif
